package com.rnny.controller;

import com.rnny.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author 软柠柠吖(Runny)
 * @date 2022-08-02
 */
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin // 解决跨域
public class EduLoginController {
    // login
    @PostMapping("/login")
    public R login() {

        return R.ok()
                .data("token", "admin");
    }
    // info
    @GetMapping("/info")
    public R info() {
        System.err.println("info被调用了");
        return R.ok()
                .data("roles","[admin]")
                .data("name", "admin")
                .data("avatar", "https://img1.baidu.com/it/u=1966616150,2146512490&fm=253&fmt=auto&app=138&f=JPEG?w=751&h=500");
    }
}
